package punchdownloader.gui;

import java.util.ArrayList;
import punchdownloader.Modelos.Anime;

/**
 *
 * @author Kennedy
 */
public class Loading extends javax.swing.JFrame {

    private ArrayList<Anime> lista_de_animes = new ArrayList<Anime>();
    String url_projetos = "http://www.punchsub.com/lista-de-animes/nome/todos/";
    private Principal gui;

    public Loading() {
        initComponents();
    }

    public Loading(Principal gui) {
        initComponents();
        this.setLocationRelativeTo(null);
        this.setVisible(true);
        this.gui = gui;

        new Thread() {

            public void run() {
                carregaConfig();
                carregaProjetos(url_projetos);
            }
        }.start();

    }

    public void carregaProjetos(final String link_projeto) {

    }

    private void carregaConfig() {
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        progresso = new javax.swing.JProgressBar();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Carregando...");
        setResizable(false);
        setUndecorated(true);

        progresso.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        progresso.setIndeterminate(true);
        progresso.setString("Carregando Projetos...");
        progresso.setStringPainted(true);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(progresso, javax.swing.GroupLayout.DEFAULT_SIZE, 467, Short.MAX_VALUE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(45, 45, 45)
                .addComponent(progresso, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(49, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JProgressBar progresso;
    // End of variables declaration//GEN-END:variables
}
